using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace Widgetsphere.Core.DataAccess
{
	public partial interface IBusinessObject : IWrappingClass, INotifyPropertyChanged, IValidation
  {
    Enum Container { get; }

		/// <summary>
		/// Gets the value of the field specified by the enumeration.
		/// </summary>
		/// <param name="field">A field enumeration value</param>
		/// <returns>The current value of the specified field</returns>
    object GetValue(Enum field);

		/// <summary>
		/// Gets the value of the field specified by the enumeration.
		/// </summary>
		/// <param name="field">A field enumeration value</param>
		/// <param name="defaultValue">Determines the value to return if the field is null</param>
		/// <returns>The current value of the specified field</returns>
		object GetValue(Enum field, object defaultValue);


		/// <summary>
		/// Gets the numeric value of the field specified by the enumeration.
		/// </summary>
		/// <param name="field">A field enumeration value</param>
		/// <returns>The current value of the specified field</returns>
		/// <remarks>This method only works with fields typed as double or that can be cast as a double</remarks>		
		double GetDouble(Enum field);

		/// <summary>
		/// Gets the numeric value of the field specified by the enumeration.
		/// </summary>
		/// <param name="field">A field enumeration value</param>
		/// <param name="defaultValue">Determines the value to return if the field is null</param>
		/// <returns>The current value of the specified field</returns>
		/// <remarks>This method only works with fields typed as double or that can be cast as a double</remarks>		
		double GetDouble(Enum field, double defaultValue);
    int GetInteger(Enum field);
    int GetInteger(Enum field, int defaultValue);
    DateTime GetDateTime(Enum field);
    DateTime GetDateTime(Enum field, DateTime defaultValue);
    string GetString(Enum field);
    string GetString(Enum field, string defaultValue);
    object GetDefault(Enum field);
    IBusinessCollection ParentCollection { get;}
    string GetFriendlyName(Enum field);
    string GetMask(Enum field);
    int GetMaxLength(Enum field);
    IPrimaryKey PrimaryKey { get; }
		bool IsEquivalent(IBusinessObject item);		
  }
}
